finding positive integer solution